<!--
 * @Author: your name
 * @Date: 2022-04-11 20:23:02
 * @LastEditTime: 2022-04-13 18:19:16
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \jk_one-stop_cloud_mobile_v1.0\src\views\reportRecord\recordDetail.vue
-->

<template>
  <div class="recordDetail">
    <Navbar :appTitle="title" />
    <!--头部-->
    <div class="d-head">
      <div class="content">
        <div class="left">
          <div class="title">
            赢创石化信息开发赢创石化赢创石化信息开发赢创石化赢创石化信息开发赢创石化
          </div>
          <div class="row">客户编号:dsdsdsdsdsd</div>
          <div class="row">张三,20220-01-11 02:10:11 发起申请</div>
        </div>
        <div class="right">
          <img src="@/assets/img/sptg.png" alt="" class="rightImg" />
        </div>
      </div>
    </div>

    <!-- taps-->
    <!--锚点选项卡-->
    <van-tabs v-model="active" scrollspy sticky offset-top="1.7rem">
      <!--基本信息 -->
      <van-tab title="基本信息" style="margin-top: 1.3rem">
        <div class="otherTaps">
          <div class="title">
            <span class="icon"></span>
            <span class="content">基本信息</span>
          </div>
          <div class="content">
            <div class="row">
              <span class="r-label">客户名称：</span>
              <span class="r-column">安徽即刻</span>
            </div>
            <div class="row">
              <span class="r-label">销售合同：</span>
              <span class="r-column">安徽即刻销售合同</span>
            </div>
            <div class="row">
              <span class="r-label">承诺交期：</span>
              <span class="r-column">2020-02-02</span>
            </div>
          </div>
        </div>
      </van-tab>
      <!--发货明细 -->
      <van-tab title="发货明细">
        <div class="otherTaps">
          <div class="title">
            <span class="icon"></span>
            <span class="content">发货明细</span>
          </div>
          <div class="content">
            <div class="fhrow">
              <img src="@/assets/home/cght.png" alt="" class="fhImg" />
              <div class="rt-column">
                <div class="rt-title">物品编号|物品名称|规格</div>
                <div class="rt-row">
                  <div class="column">
                    <span class="column-t">订购数量</span>
                    <span class="column-c">5000箱</span>
                  </div>
                  <div class="column">
                    <span class="column-t">订购基本数量</span>
                    <span class="column-c" style="color: #FF4D4F;">5000片</span>
                  </div>
                </div>
                <div class="rt-row">
                  <div class="column">
                    <span class="column-t">已申请发货数量</span>
                    <span class="column-c">50箱</span>
                  </div>
                  <div class="column">
                    <span class="column-t">本次申请发货数量</span>
                    <span class="column-c" style="color: #FF4D4F;">3000箱</span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </van-tab>
      <!--其它 -->
      <van-tab title="其它">
        <div class="otherTaps">
          <div class="title">
            <span class="icon"></span>
            <span class="content">其它</span>
          </div>
          <div class="content">
            <div class="row">
              <span class="r-label">备注：</span>
              <span class="r-column"
                >这是一个很长的备注.这是一个很长的备注.这是一个很长的备注.这是一个很长的备注.这是一个很长的备注.</span
              >
            </div>
            <div class="row">
              <span class="r-label">附件：</span>
              <span class="r-column">
                <upload
                  class="fileclass"
                  iconType="fj"
                  @fileChange="fileChange"
                  :fileIds="fileIds"
                  :showUpload="false"
                ></upload>
              </span>
            </div>
          </div>
        </div>
      </van-tab>
      <!--审批流程 -->
      <van-tab title="审批流程">
        <div class="otherTaps" style="padding-bottom: 1rem">
          <div class="title">
            <span class="icon"></span>
            <span class="content">审批流程</span>
          </div>
          <div class="content">
            <div class="row">
              <span class="r-label">客户名称：</span>
              <span class="r-column">安徽即刻</span>
            </div>
            <div class="row">
              <span class="r-label">销售合同：</span>
              <span class="r-column">安徽即刻销售合同</span>
            </div>
            <div class="row">
              <span class="r-label">承诺交期：</span>
              <span class="r-column">2020-02-02</span>
            </div>
          </div>
        </div>
      </van-tab>
    </van-tabs>

    <!--提交按钮 -->
    <div class="search-bottom">
      <span class="btncancel" @click="cancel">拒绝</span>
      <span class="btnconfirm" @click="confirm">同意</span>
    </div>
  </div>
</template>

<script>
import Navbar from "@/components/navBar/navBar_right";
import upload from "@/components/upload/upload";
export default {
  name: "recordDetail",
  components: { Navbar, upload },
  data() {
    return {
      title: this.$route.meta.title,
      tabList: [
        { name: "发货记录", value: "1" },
        { name: "开票记录", value: "2" },
        { name: "收款记录", value: "2" },
      ],
      active: 0,
      fileIds: "1514159656052879361,1514159725032402946",
    };
  },
  computed: {},
  mounted() {},
  created() {
    this.applyType = this.$route.query.applyType;
    let queryType = "";
  },
  methods: {
    cancel() {},
    confirm() {},
    fileChange(ids) {
      console.log(ids);
      this.formData.attachment = ids;
    },
    tapChange(obj) {
      this.active = obj;

      // const menuHeight = document.getElementById("d-head").offsetHeight;
      // let div1 = document.getElementById(obj).offsetTop;
      let pp = document.getElementById(obj);
      pp.scrollIntoView({
        behavior: "smooth",
        block: "start",
        inline: "start",
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.recordDetail {
  height: 100vh;
  //   overflow-y: scroll;
  .d-head {
    position: fixed;
    width: 100%;
    padding: 0.16rem 0.16rem 0.16rem 0.16rem;
    background: #ffffff;
    z-index: 999;
    .content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .left {
        width: 2.8rem;
        // border: 1px solid red;
        .title {
          font-size: 0.16rem;
          font-family: PingFang SC;
          font-weight: 500;
          color: #191f25;
          line-height: 0.22rem;

          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          -o-text-overflow: ellipsis;
        }
        .row {
          font-size: 0.14rem;
          font-family: PingFang SC;
          font-weight: 400;
          color: #888888;
          margin-top: 0.16rem;
        }
      }
      .right {
        // border: 1px solid red;
        width: 0.6rem;
        .rightImg {
          display: block;
          width: 0.55rem;
          height: 0.55rem;
          //   margin-left: 0.45rem;
          // border: 1px solid blue;
        }
      }
    }
  }

  .otherTaps {
    background: #ffffff;
    padding: 0.16rem;
    margin-top: 0.1rem;
    .title {
      padding-bottom: 0.1rem;
      border-bottom: 1px solid #eeeeee;
      .icon {
        display: inline-block;
        width: 0.03rem;
        height: 0.14rem;
        background: #1890ff;
      }
      .content {
        width: 0.63rem;
        height: 0.16rem;
        font-size: 0.16rem;
        font-family: PingFang SC;
        font-weight: bold;
        color: #191f25;
        line-height: 0.22rem;
        margin-left: 0.1rem;
      }
    }
    .content {
      .row {
        font-size: 0.14rem;
        font-family: PingFang SC;
        font-weight: 400;
        margin-top: 0.16rem;
        display: flex;
        .r-label {
          color: #888888;
          display: block;
          width: 0.7rem;
          //   border: 1px solid red;
        }
        .r-column {
          display: block;
          color: #191f25;
          width: 2.5rem;
          //   border: 1px solid red;
          //    width: 1rem;
        }
      }
      .fhrow {
        display: flex;
        .fhImg {
          width: 0.55rem;
          height: 0.55rem;
          border-radius: 0.1rem;
        }
        .rt-column {
            width: 2.55rem;
        //   height: 2.55rem;
          margin-left: 0.2rem;
          .rt-title {
            font-size: 0.16rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: #191f25;
            margin-bottom: 0.16rem;
          }
          .rt-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.23rem;
            .column {
            //    border: 1px solid red;
               width: 1.5rem;
              .column-t {
                font-size: 0.14rem;
                font-family: PingFang SC;
                font-weight: 400;
                color: #888888;
                display: block;
                width: 100%;
                margin-bottom: 0.03rem;
                
              }
              .column-c {
                font-size: 0.16rem;
                font-family: PingFang SC;
                font-weight: 400;
                color: #191f25;
                display: block;
                width: 100%;
              }
            }
          }
        }
      }
    }
  }
  .search-bottom {
    height: 0.5rem;
    width: 100%;
    background: #ffffff;
    // background: red;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: 0px;
    padding: 0.11rem;
    .btnconfirm {
      width: 1.72rem;
      height: 0.39rem;
      background: #1890ff;
      border-radius: 0rem;
      text-align: center;
      line-height: 0.39rem;
    }
    .btncancel {
      width: 1.72rem;
      height: 0.39rem;
      background: #f6f6f6;
      border: 0.01px solid rgba(25, 31, 37, 0.12);
      border-radius: 0rem;
      text-align: center;
      line-height: 0.39rem;
    }
  }
}
</style>
<style>
.van-tabs__line {
  background-color: #1890ff;
}
.van-tab--active {
  color: #1890ff;
}
</style>